# !/usr/bin/env python
# -*- coding: utf-8 -*-
# ///////////////////////////////////////////////////////////////
# @File    :   getImageBaseData.py
# @Time    :   2024/08/21 14:39:56
# @Author  :   kai.luo
# @Version :   1.0.0
# @Desc    :   获取医疗图片中检查项目的公共库
# ///////////////////////////////////////////////////////////////

import re
import copy
import traceback
from moudles.MedicalReportForm.commonLibrary.common import *


class MainInfo(object):
    """
    项目,结果,单位,参考区间,提示
    Args:
        object (_type_): _description_
    """

    def __init__(self, **kwarg) -> None:
        # 初始化参数
        pass

    def getDesc(self, data: list):
        desc_str = ''
        isSkip = True
        for index, item in enumerate(data):
            text = item[1][0]
            if '描述：' in text and isSkip:
                isSkip = False
                continue
            else:
                if not isSkip:
                    desc_str += text

        return desc_str
